<template>
  <div class="fragments">
    <div class="header">
      <div class="wrap">
        <div class="b" onclick="_methods.goBack()">
          <i class="iconfont icon-tuihui b-i"></i>
        </div>
        <h1 class="t">
          <span>信息详情</span>
        </h1>
      </div>
    </div>
    <div class="container-y infoBody container-y1" style="z-index: 999">
      <bodyWrap :isShow="bodyShow">
        <div slot="body" class="infoWrap" v-if="bodyShow">
          <div class="desc-header">
            <h3>{{details.title}}</h3>
            <div class="dh-sec">
              <span><label for="">报送单位：</label>{{details.createUserInfo.orgName}}</span>
            </div>
            <div class="dh-sec">
              <span><label for="">报送人：</label>{{details.createUserInfo.linkdoodName}}</span>
            </div>
            <div class="dh-sec">
              <span><label for="">发生时间：</label>{{details.happenTime}}</span>
            </div>
            <div class="dh-sec">
              <span><label for="">联系方式：</label>{{details.createUserInfo.cellphone}}</span>
            </div>
            <div class="dh-sec">
              <span><label for="">传真：</label>{{details.fax}}</span>
            </div>
          </div>
          <template-items
            v-if="details != 99"
            v-for="(item,index) in temTitle"
            :key="index"
            :list="temList">
          </template-items>
          <!--<div class="desc-body bt2" v-if="zjAdviceList.length">-->
            <!--<h6>专家研判：</h6>-->
            <!--<div class="db-content">-->
              <!--<div v-for="item in zjAdviceList" v-if="item.isJudged == 1">-->
                <!--<div class="zj1">{{item.userName}}&nbsp;&nbsp;{{item.createTime}}</div>-->
                <!--<pre>{{item.advice}}</pre>-->
              <!--</div>-->
            <!--</div>-->
          <!--</div>-->
        </div>
      </bodyWrap>
    </div>
  </div>
</template>

<script>
  import store from "../../store/store.js"
  import templateItems from "../commonComponents/templateItems.vue"
  export default {
    data() {
      return {
        details: 99,
        fileList: [],
        headerRightType: null,
        headerFlag: null,
        bodyShow: false,
        isSubmitAgain: 0,
        zjAdviceList: [],
        temTitle: [1],
        temList: [],
        zjRequireTxt: {
          judgmentClaim: "",
          status: 30,
        },
      }
    },
    methods: {
      getDetail() {
        let self = this;
        let id = _methods.getUrlParam("id");
        this.id = id;
        let ajUrl = _ajaxUrls.baseTable;
        _ajax.noLoading(ajUrl.url + "/" + id,
          {},
          (ajData) => {
            let data = ajData.result;
            self.details = data;
            self.temList = _methods.temRead(data.extend);
            self.bodyShow = true;
          }, ajUrl.type);
      },
      zjAdvice() {
        _ajax.noLoading(_ajaxUrls.judged.url,
          {
            size: 10,
            page: 1,
            articleID: this.id,
          },
          (ajData) => {
            this.zjAdviceList = ajData.result.records;
          }, "get");
      },
    },
    created() {
      _vrvInit.isPush().then(() => {
        this.headerRightType = store.state.headerRightType;
        this.headerFlag = store.state.showFlag;
        _methods.headerRightShow();
        this.type = _methods.getUrlParam(101);
        _methods.headerTitleChange(101);
        this.getDetail();
        // _data.userInfo.isCenterInit(()=>{
        //   this.zjAdvice();
        // },()=>{})
      });
    },
    components: {
      templateItems,
    },
    beforeDestroy() {
      _methods.headerRightShow(this.headerRightType);
      _methods.headerTitleChange(this.headerFlag, true);
    }
  }
</script>

<style scoped>
  .fragments{
    z-index: 999;
    position: fixed;
  }
  .container-y1{
    top:40px!important;
  }
</style>
